package com.goblin.model.film.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.goblin.model.base.BaseEntity;
import lombok.Data;

@Data
@Table(name = "t_test_film_comment")
@Entity
public class Comment extends BaseEntity {

	private static final long serialVersionUID = 6474136815751334425L;

	@Column(name = "name", columnDefinition = "varchar(255) COMMENT '评论人姓名'")
	private String name;

	@Column(name = "date", nullable = false, columnDefinition = " varchar(255) COMMENT '评论时间'")
	private String date;

	@Column(name = "score", columnDefinition = " double(2,1) COMMENT '打分'")
	private Double score;

	@Column(name = "likes", columnDefinition = "varchar(255)  COMMENT '获赞数'")
	private String likes;

	@Column(name = "content", columnDefinition = " text COMMENT '评论内容'")
	private String content;

	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "film", referencedColumnName = "id", columnDefinition = " int(11) COMMENT '電影'")
	private Film film;

}
